<?php plogger_get_header(); ?>

<div id="breadcrumbs">
    <div id="slideshow_b"> <?php echo plogger_slideshow_link(); ?> <?php echo plogger_print_button(); ?> </div>
    <!-- /slideshow -->
    <?php echo generate_breadcrumb('列表首页', ' &raquo; '); ?>
    <div id="search-container"> <?php echo generate_search_box(); ?>
        <div class="clearfix"></div>
    </div>
    <div class="clearfix"></div>
</div>
<!-- /breadcrumbs -->
<?php echo plogger_download_selected_form_start(); ?>
<div class="color_1_div"> </div>
<div id="thumbnail-container" class="clearfix">
    <?php if (plogger_has_albums()) : ?>
    <div id="collections">
        <?php $odd = true;?>
        <?php while(plogger_has_albums()) : plogger_load_album();
	// Find thumbnail width/height
	$thumb_info = plogger_get_thumbnail_info();
	$thumb_width = $thumb_info['width']; // The width of the image. It is integer data type.
	$thumb_height = $thumb_info['height']; // The height of the image. It is an integer data type.
?>
        <div class="thumbnail_container_f_one_1">
            <div class="thumbnail_container_f_one_2">
                <div class="collection_1<?php echo $odd ? ' odd' : ''; $odd = !$odd;?>"> <a class="collection-image-link" href="<?php echo plogger_get_album_url(); ?>"><img class="photos" src="<?php echo plogger_get_album_thumb(); ?>" width="<?php echo $thumb_width; ?>" height="<?php echo $thumb_height; ?>" title="<?php echo plogger_get_album_name(); ?>" alt="<?php echo plogger_get_album_name(); ?>" /></a>
                    <h2><a href="<?php echo plogger_get_album_url(); ?>" onclick="count()"><?php echo plogger_get_album_name(); ?></a></h2>
                    <?php echo plogger_download_checkbox(plogger_get_album_id()); ?> <span class="meta-header"><?php echo plog_tr('包含'); ?> <?php echo plogger_album_picture_count() . ' '; echo (plogger_album_picture_count() == 1) ? plog_tr('页') : plog_tr('页'); ?><?php echo " (浏览:";
			$query="SELECT clicks FROM plogger_albums WHERE id='".plogger_get_album_id()."'";
			$result=run_query($query);
			$row = mysql_fetch_array($result);
			echo $row['clicks']."次)";
				?></span>
                    <p class="description"><?php echo plogger_get_album_description(); ?></p>
                    <div class="clearfix"></div>
                </div>
                <!-- /collection -->
            </div>
        </div>
        <?php endwhile; ?>
    </div>
    <!-- /collections -->
    <div class="color_1_div"> </div>
    <?php else : ?>
    <div id="no-pictures-msg">
        <h2><?php echo plog_tr('No Albums') ?></h2>
        <p><?php echo plog_tr('Sorry, but there are no images or albums in this collection yet.') ?></p>
    </div>
    <!-- /no-pictures-msg -->
    <?php endif; ?>
</div>
<!-- /thumbnail-container clearfix -->
<?php plogger_get_footer(); ?>
